package com.lmscn.lms.api.model;

import com.jfinal.plugin.activerecord.Model;

import java.util.List;

/**
 * Created by Czl on 2015/9/14.
 */
@SuppressWarnings("serial")
public class MyExamStudent extends Model<MyExamStudent> {

    public static final MyExamStudent dao = new MyExamStudent();

    /**
     * 查询我的考试
     * @param studentId
     * @return
     */
    public List<MyExamStudent> findByStudentId(Long studentId,int status){
        return dao.find("select t.* from t_myexam_student t where t.student_id = ? and status= ?",studentId,status);
    }

    public MyExamStudent findScore(Long studentId,Long myexamId){
        return dao.findFirst("select * from t_myexam_student where student_id = ? and myexam_id =? ",studentId,myexamId);
    }
}
